﻿@model MobilesStore.Domain.Entities.Product

@{
    ViewBag.Title = "Admin Edit: " + Model.ProductName;
    Layout = "~/Views/Shared/_MainLayout.cshtml";
}
<div id="column-left">
        <div class="box">
          <div class="box-heading">Information</div>
          <div class="box-content">
            <ul class="list-item">
              <li>@Html.ActionLink("About Us","About")</li>
              <li><a href="#">Delivery Information</a></li>
              <li><a href="#">Privacy Policy</a></li>
              <li><a href="#">Terms &amp; Conditions</a></li>
              <li>@Html.ActionLink("Contact Us","Contact")</li>
              <li><a href="#">Site Map</a></li>
            </ul>
          </div>
        </div>
        <div class="box">
          <div class="box-heading">Bestsellers</div>
          <div class="box-content">
            <div class="box-product">
              <div class="flexslider">
                @{Html.RenderAction("BestSellerProductsSmall", "Nav");}
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--Left End-->
      <!--Middle Part Start-->
      <div id="content">
        <!--Breadcrumb Part Start-->
        <div class="breadcrumb">@Html.ActionLink("Home","Index","Home") » @Html.ActionLink("Admin","Index","Admin")</div>
        <!--Breadcrumb Part End-->
        <h1>Edit @Model.ProductName</h1>
            @using (Html.BeginForm("Edit", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
            {
                @Html.EditorForModel()

                <div class="editor-label">Image</div> 
                <div class="editor-field"> 
                    @if (Model.ImageData == null) { 
                        @:None 
                    } else { 
                        <img width="150" height="150" 
                        src="@Url.Action("GetImage", "Product", new { Model.ProductID })" /> 
                    } 
                    <div>Upload new image: <input type="file" name="Image" class="button"/></div> 
                </div>
                <br />
                <input type="submit" value="Save" class="button">
                @Html.ActionLink("Cancel and return to list", "Index", null, new { @class="button"})
            }
      </div>
      <!--Middle Part End-->

